import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { ServiceService } from './service.service';


@Controller('service')
export class ServiceController {
  constructor(private readonly serviceService: ServiceService) {}

  // 根据命名空间获取服务列表
  @Post('/listService/:agentId')
  postListServices(@Body() body: any) {
    return this.serviceService.postListServices();
  }

      // 查看当前服务
  @Post('/getService/:agentId')
  async postDetailService(@Body() body: any) {
    return this.serviceService.postDetailService();
  }


  /* 删除当前服务 */
  @Post('/deleteService/:agentId')
  postDeleteService(@Body() body: any) {
   return this.serviceService.postDeleteService(body);
  }


  /* 获取服务yaml */
  @Post('/getV1Service/:agentId')
  postGetServiceYaml(@Body() body: any) {
    return this.serviceService.postGetServiceYaml(body);
  }
}
